package com.mapper;/**
 * @program: SmbmsDemo
 * @description: 订单接口实现层
 * @author: Mr.Kang
 * @create: 2020-06-01 10:58
 **/

import com.pojo.Bill;
import org.mybatis.spring.SqlSessionTemplate;
import javax.annotation.Resource;
import java.util.List;

/**
 * @Description:
 * @author 康康真滴暖
 * @date 2020-06-01 10:58
 */

public class BillDaoImpl implements BillDao {
    @Resource
    private SqlSessionTemplate sqlSessionTemplate;


    @Override
    public int add( Bill bill) throws Exception {
        return sqlSessionTemplate.getMapper(BillDao.class).add(bill);
    }

    @Override
    public List<Bill> getBillList(Bill bill) throws Exception {
        return sqlSessionTemplate.getMapper(BillDao.class).getBillList(bill);
    }

    @Override
    public int deleteBillById(String delId) throws Exception {
        return sqlSessionTemplate.getMapper(BillDao.class).deleteBillById(delId);
    }

    @Override
    public Bill getBillById(String id) throws Exception {
        return sqlSessionTemplate.getMapper(BillDao.class).getBillById(id);
    }

    @Override
    public int modify(Bill bill) throws Exception {
        return sqlSessionTemplate.getMapper(BillDao.class).modify(bill);
    }

    @Override
    public int getBillCountByProviderId(String providerId) throws Exception {
        return sqlSessionTemplate.getMapper(BillDao.class).getBillCountByProviderId(providerId);
    }
}
